"""

"""
import datetime
import time

print(datetime.time.hour)  # 得到但是一个hour对象
d = datetime.date(2020, 11, 24)
print(d.day)
print(datetime.date.ctime(d))
# ---------------------------------重要--------------------------
# datetime,datedelta
print(datetime.date.today())  # 2020-11-24
# datedelta 计算时间差,一般常常和now进行比较
t = datetime.timedelta(days=2, hours=2)
now = datetime.datetime.now()
result = now - t  # 常常和当前时间可以进行加减计算时间差值
print(result)
